from haystack import indexes

from .models import Article

class ArticleIndex(indexes.SearchIndex,indexes.Indexable):
    '''
    suo yinshuju moxinglei
    '''
    def get_model(self):
        '''
        fanhui jianlisuoyinde moxinglei
        '''
        return Article
    def index_queryset(self, using=None):
        return self.get_model().objects.order_by('-id')